angular.module('starter.home.controllers', [])

.controller('starterCtl', ['$scope', '$state', '$http', function($scope, $state, $http){
	$scope.dataRouteList = [
		{state:"home", name: "Home", status:1, url:"#/home", icon:"fa-cog"},
		{state:"other", name: "Other", status:0, url:"#/other", icon:"fa-picture-o"}
	];

	$scope.title = "&lt;span style='color:red;'&gt;starter&lt;/span&gt;";
	//$scope.title = "<span style='color:red;'>starter</span>";
	$scope.state_go = function(index){
		angular.forEach($scope.dataRouteList, function(item){
			item.status=0;
		});
		$scope.dataRouteList[index].status=1;
		$state.go($scope.dataRouteList[index].state);
	};
	
}])

.controller('HomeController',['$scope', '$state', 'ProductServices', function($scope, $state, $ProductServices) {
	$scope.title = 'Home';
	$scope.productsDataSource = $ProductServices.all();

	$scope.listViewTemplate = '<p>#: ShipCity #</p>';
  
}]);